<?php

namespace App\Console\Commands;

use App\Api\Dao\OrderDao;
use App\Api\Dao\UserDao;
use App\Models\TongOrder;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;

class UserUpgrade extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'UserUpgrade';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '用户的自动升级每一个小时执行一次';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 取消未支付的订单
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        Log::info('自动升级更新用户');
        UserDao::UserUpgrade();
    }
}
